# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=squeekboard
pkgver=1.9.3
pkgrel=0
pkgdesc="The final Phosh keyboard"
arch="all !s390x !ppc64le !mips !mips64" # Blocked by rust, fails to build on ppc64le
url="https://source.puri.sm/Librem5/squeekboard"
license="GPL-3.0-or-later"
makedepends="meson ninja rust cargo bash glib-dev wayland-protocols wayland-dev
	gtk+3.0-dev gnome-desktop-dev feedbackd-dev"
checkdepends="xvfb-run"
source="https://source.puri.sm/Librem5/squeekboard/-/archive/v$pkgver/squeekboard-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	xvfb-run ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}
sha512sums="6d3459869e1c350f796e2ea0654e603a94e3487bb69be6a2237e9e2044237685a9466e9e31a7cef6d8b34127735c823c58bf0d0486d0c3ac798fe5d7c3afb8d3  squeekboard-v1.9.3.tar.gz"
